<template>
  <button class="button" :style="customStyle" @click="$emit('click')">
    <slot></slot>
  </button>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const props = defineProps<{
  style?: any
}>()
const customStyle = ref(props.style || {})
</script>

<style scoped>
.button {
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  background-color: #42b983;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.button:hover {
  background-color: #359469;
}
</style>